//
//  SCRecentPlayRadioTableViewCell.m
//  LastOne
//
//  Created by dllo on 15/11/5.
//  Copyright © 2015年 sc. All rights reserved.
//

#import "SCRecentPlayRadioTableViewCell.h"
#import <UIImageView+WebCache.h>
#import "FitHeader.h"
@implementation SCRecentPlayRadioTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _bigImageView = [[UIImageView alloc] initWithFrame:CGRectMake(10 * FitWidth, 10 * FitHeight, 70 * FitWidth, 70 * FitHeight)];
        [self.contentView addSubview:_bigImageView];
        _bigImageView.backgroundColor = [UIColor redColor];
        
        _bigImageView.layer.masksToBounds = YES;
        _bigImageView.layer.cornerRadius = 35 * FitWidth;
        
        _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(_bigImageView.frame.origin.x + _bigImageView.frame.size.width, 30 * FitHeight, 290 * FitWidth, 30 * FitHeight)];
        [self.contentView addSubview:_titleLabel];
        _titleLabel.backgroundColor = [UIColor yellowColor];
    }
    return self;
}

- (void)setPlayRadio:(SCPlayRadio *)playRadio
{
    if (_playRadio != playRadio) {
        [_bigImageView sd_setImageWithURL:[NSURL URLWithString: playRadio.cover] placeholderImage:[UIImage imageNamed:@"placehold"]];
        _titleLabel.text = playRadio.alt;
    }
}
@end
